package org.popupcommunication.dao.impl;

import java.util.List;

import javax.persistence.TypedQuery;

import org.popupcommunication.dao.AgendaPersoDAO;
import org.popupcommunication.model.AgendaPerso;

public class AgendaPersoJpa extends GenericRepositoryJpa<AgendaPerso> implements AgendaPersoDAO {

	@Override
	public List<AgendaPerso> getEventByUser(int idUser) {
		TypedQuery<AgendaPerso> query =  this.getEntityManager().createQuery("SELECT a FROM AgendaPerso a where a.idUser=:idU", AgendaPerso.class);
		query.setParameter("idU", idUser);
		List<AgendaPerso> results = query.getResultList();
		return results;
	}

}
